<template>
  <div>
    <el-row>
      <el-col :span="24">
        <div>
          账号：<input type="text" /> 姓名：<input type="text" /> 手机号：<input
            type="text"
          />
          <el-tag>搜索</el-tag>
          <el-tag>清空</el-tag>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="8">
        <div>
          <el-tag type="success">新增</el-tag>
          <el-tag type="danger">删除</el-tag>
        </div>
      </el-col>
    </el-row>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column width="80">
      </el-table-column>
      <el-table-column prop="rid" label="编号" width="120">
      </el-table-column>
      <el-table-column prop="roleName" label="角色名称"> </el-table-column>

      <el-table-column prop="roleExplain" label="角色描述"> </el-table-column>
      <el-table-column fixed="right" label="操作">
        <template>
          <el-button type="text" size="small">禁用</el-button>
          <el-button type="text" size="small">启用</el-button>
          <el-button type="text" size="small">编辑</el-button>
          <el-button type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      checked: true,
      tableData: [
        {
          roleId: "1",
          roleName: "admin",
          roleExplain: "admin",
        },
      ],
    };
  },
  created: function () {
        this.$axios
          .get("roles")
          .then((res) => {
            if (res.data.statusCode == 200) {
              this.tableData = res.data.info;
            }
          })
          .catch((error) => {
            console.log(error);
          });
      },
};
</script>
<style scoped>
</style>


